#pragma once

#define  OCCLUSION_DEFAULT_LEVEL 0.5
#define  OCCLUSION_MAX_LEVEL 0.9
#define  OCCLUSION_MIN_LEVEL 0.1
typedef struct OCCLUSION_PARAMETERS{
	float occlusionLevel;
}	OCCLUSION_PARAMETERS;


class OcclusionXAPO:  public CXAPOParametersBase {
public:
  OcclusionXAPO(const XAPO_REGISTRATION_PROPERTIES *pRegProperties, BYTE* pParameters, UINT32 ParametersSize, BOOL fProducer, WAVEFORMATEXTENSIBLE* pWfx);
  virtual ~OcclusionXAPO() {}
  
  // XAPO methods
  STDMETHOD_(void, Process)(UINT32,const XAPO_PROCESS_BUFFER_PARAMETERS *,UINT32,XAPO_PROCESS_BUFFER_PARAMETERS *,BOOL);
  STDMETHOD(LockForProcess) (UINT32 InputLockedParameterCount, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputProcessParameters, UINT32 OutputLockedParameterCount, XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputProcessParameters);


  
  STDMETHOD_(void, GetParameters)  ( void *pParameters, UINT32 ParametersByteSize ) {
    assert(ParametersByteSize == 4); 
    ((OCCLUSION_PARAMETERS*)pParameters)->occlusionLevel = occlusionLevel;
  }
  
  STDMETHOD_(void, SetParameters)  (const void *pParameters, UINT32 ParametersByteSize ) {
    assert(ParametersByteSize == 4);
    occlusionLevel = ((OCCLUSION_PARAMETERS*)pParameters)->occlusionLevel;
  }

private:
  int channels;
  int bytesPerSample;
  float occlusionLevel;
  float lastOutput[6];
  
};
